package com.js.lottery.infra.dao;

import cn.bugstack.middleware.db.router.annotation.DBRouter;
import com.js.lottery.infra.po.UserTakeActivity;
import org.apache.ibatis.annotations.Mapper;

/**
 * @description:
 * @author:Pine Jiang
 * @Date:2023/11/27
 **/

@Mapper
public interface IUserTakeActivityDao {
    /**
     * 插入用户领取活动信息
     * 注解表示，根据uId进行分表
     * @param userTakeActivity 入参
     */
    @DBRouter(key = "uId")
    void insert(UserTakeActivity userTakeActivity);

    int lockTackActivity(UserTakeActivity userTakeActivity);

    @DBRouter
    UserTakeActivity queryNoConsumedTakeActivityOrder(UserTakeActivity userTakeActivity);
}
